﻿using System;
using MessagePack.Formatters;
using MessagePack.Internal;

namespace MessagePack.Resolvers
{
	// Token: 0x0200010B RID: 267
	public class DynamicGenericResolver : IFormatterResolver
	{
		// Token: 0x060003C4 RID: 964 RVA: 0x0000E10F File Offset: 0x0000C50F
		private DynamicGenericResolver()
		{
		}

		// Token: 0x060003C5 RID: 965 RVA: 0x0000E117 File Offset: 0x0000C517
		public IMessagePackFormatter<T> GetFormatter<T>()
		{
			return DynamicGenericResolver.FormatterCache<T>.formatter;
		}

		// Token: 0x04000163 RID: 355
		public static readonly IFormatterResolver Instance = new DynamicGenericResolver();

		// Token: 0x0200010C RID: 268
		private static class FormatterCache<T>
		{
			// Token: 0x04000164 RID: 356
			public static readonly IMessagePackFormatter<T> formatter = (IMessagePackFormatter<T>)DynamicGenericResolverGetFormatterHelper.GetFormatter(typeof(T));
		}
	}
}
